Hi. I've seen the discussion in https://www.ibm.com/developerworks/community/forums/html/topic?id=7981c520-ee1b-4a5f-b1f7-510172d2a3bd&ps=25 and have a copy of the GalacticSolutions Excel export script. That script takes the color of the font in a module cell and maps it to the Excel cell-fill color. What isn't clear to me is how to take that same source color and map it instead to the Excel cell's text color. My source attribute is an enumeration with the assigned colors setting the font color. Perhaps the simplest answer that would help me is if someone familiar with the GalacticSolutions script , http://www.galactic-solutions.com/downloads/GalacticDownloadExcel.htm , could identify the code which passes the color to the cell fill-color and provide the equivalent command to handle the font color. thanks Carl witthoft_carl - Tue Jan 17 15:18:14 EST 2017 |
Re: how to export enumeration color to Excel font color I do not know the script, but from a short view - did you check the excelApplyColorForAttributeValue method? It calls the excelSetRangeColorOLE function which looks like this:
void excelSetRangeColorOLE( OleAutoObj objExcelRange, int iRGBValue ) {
OleAutoObj objExcelInterior = null
oleResult( oleGet( objExcelRange, cExcelPropertyInterior /* "Interior" */, objExcelInterior ) )
oleResult( olePut( objExcelInterior, cExcelPropertyColor /* Color */, iRGBValue ) )
}
Did you try changing the "Interior" to "Font" ? is that what you want? Regards, Mathias
|
Re: how to export enumeration color to Excel font color Mathias Mamsch - Thu Jan 19 06:16:50 EST 2017 I do not know the script, but from a short view - did you check the excelApplyColorForAttributeValue method? It calls the excelSetRangeColorOLE function which looks like this:
void excelSetRangeColorOLE( OleAutoObj objExcelRange, int iRGBValue ) {
OleAutoObj objExcelInterior = null
oleResult( oleGet( objExcelRange, cExcelPropertyInterior /* "Interior" */, objExcelInterior ) )
oleResult( olePut( objExcelInterior, cExcelPropertyColor /* Color */, iRGBValue ) )
}
Did you try changing the "Interior" to "Font" ? is that what you want? Regards, Mathias
Mathias, thanks for the code/command suggestions. I will try those out and report back. |
Re: how to export enumeration color to Excel font color Mathias Mamsch - Thu Jan 19 06:16:50 EST 2017 I do not know the script, but from a short view - did you check the excelApplyColorForAttributeValue method? It calls the excelSetRangeColorOLE function which looks like this:
void excelSetRangeColorOLE( OleAutoObj objExcelRange, int iRGBValue ) {
OleAutoObj objExcelInterior = null
oleResult( oleGet( objExcelRange, cExcelPropertyInterior /* "Interior" */, objExcelInterior ) )
oleResult( olePut( objExcelInterior, cExcelPropertyColor /* Color */, iRGBValue ) )
}
Did you try changing the "Interior" to "Font" ? is that what you want? Regards, Mathias
Yes, that change from "Interior" to "Font" worked perfectly. Thanks again for the help. |